<template>
  <div>
    <button @click="isshow = !isshow">显示隐藏</button>
    <!-- <h1 v-show="isshow" class="come">123456789</h1> -->
    <transition name="hello" appear>
      <!-- 一上来加载 -->
      <h1 v-show="isshow">123456789</h1>
      <div v-show="isshow">
        <h1 v-show="isshow">123456789</h1>
        <h1 v-show="isshow">123456789</h1>
      </div>
    </transition>
  </div>
</template>

<script>
export default {
  name: "test",
  data() {
    return {
      isshow: true,
    };
  },
};
</script>

<style scoped>
h1 {
  background-color: skyblue;
  /* transition: 0.5s linear; */
}
/* 进入起点 */
.hello-enter,.hello-leave-to {
 transform: translateX(-100%);}
 .hello-enter-active,.hello-leave-active{
  transition: 0.5s linear;

 }
/* 进入终点 */
.hello-enter-to,.hello-leave {
    transform: translateX(0);
}
/* ；离开起点
.hello-leave {
 transform: translateX(0);}
/* ；离开终点 */
/* .hello-leave-to {
    transform: translateX(100%);
} */ 

</style>>